<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			//匿名函数
			var f = function(){};
			
			//ES5
			console.log(f.name);//""
			//ES6
			console.log(f.name);//"f"
			
			//具名函数
			const myfun = function fun(){};
			
			//ES5
			console.log(myfun.name);//"fun"
			//ES6
			console.log(myfun.name);//"fun”

		</script>
	</body>
</html>
